package com.neusoft.kq.demos.controller;

import com.neusoft.kq.demos.R;
import com.neusoft.kq.demos.entity.His;

import com.neusoft.kq.demos.service.HisService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/his")
public class HisConrtroller {
    @Autowired
    private HisService hisService;
    @GetMapping("/list")
    public R selectHisList(His his){
        List<His> list=hisService.selectList(his);

        return R.success(list);
    }

    @PostMapping("/addHis")
    public  R addHis(His his){
        hisService.addHis(his);
        return R.success("添加成功");
    }




}
